﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ForkCarRelationManager.DB
{
   public class LoginInfo
    {
        //用户帐号id
       private int _Account=-1;
       public int Account { get { return _Account; } set { _Account = value; } }


        //用户名
        private string _AccountName = "";
        public string AccountName { get { return _AccountName; } set { _AccountName = value; } }


        //登录时间
        private DateTime _LoginTime;
        public DateTime LoginTime { get { return _LoginTime; } set { _LoginTime = value; } }


        private static LoginInfo _CurrentUser = null;


        //应用单件模式，保存用户登录状态
        public static LoginInfo CurrentUser
        {
            get
            {
                if (_CurrentUser == null)
                    _CurrentUser = new LoginInfo();
                return _CurrentUser;
            }
        }
    }
}
